﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true" CodeBehind="SCJH_Query.aspx.cs" Inherits="CoolERP_Web.User.SCJH_Query" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script src="../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script type="text/javascript">
    function viewMX(id) {
        var dg = new J.dialog({ id: 'select', title: '查看计划明细', page: 'SCJHMX.aspx?id=' + id, iconTitle: false, cover: true, btnBar: false, rang: true, autoSize: true, width: 1000, height: 650 });
        dg.ShowDialog();
    }    
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M><div><b>生产计划管理</b></div></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags>
                <li class=liTitle><div>查询合同</div></li>
            </ul>
            <table class="grvCSS" cellspacing="0" rules="all" border="1" style="width:100%;border-collapse:collapse;">
		        <tr>
			        <td>合同编号：<asp:TextBox ID="txtHTBH" runat="server"/></td>
                    <td>客户简称：<asp:TextBox ID="txtKHJC" runat="server"/></td>
                    <td>产品编号：<asp:TextBox ID="txtCPBH" runat="server"/></td>
                    <td>出货时间：<asp:TextBox ID="txtS_Time" runat="server" CssClass="textbox Wdate" Width=90px onclick="WdatePicker({dateFmt: 'yyyy-MM-dd'});"/>
                        —— <asp:TextBox ID="txtE_Time" runat="server" CssClass="textbox Wdate" Width=90px onclick="WdatePicker({dateFmt: 'yyyy-MM-dd'});"/></td>
                    <td><asp:ImageButton ID="btnQuery" runat="server" ImageUrl="~/Images/Common/btn_query0.png" OnClick="btnQuery_Click" />&nbsp;&nbsp;
                        <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/Images/Common/btn_reset0.png" OnClick="btnReset_Click" /></td>
		        </tr>
	        </table>
            <ul class=tags>
                <li class=selTag onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton1" Text="待处理合同" runat="server" CommandArgument="0" OnCommand="LinkButton_Command"/></div></li>
                <li onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton2" Text="待确认计划单" runat="server" CommandArgument="1" OnCommand="LinkButton_Command"/></div></li>
                <li onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton3" Text="已确认计划单" runat="server" CommandArgument="2" OnCommand="LinkButton_Command"/></div></li>
                <li class=liRight><a href="SCJH_Edit.aspx"><img src="../Images/Common/btn_add0.png" border=0 /></a>&nbsp;&nbsp;
                <asp:ImageButton ID="btnDel" runat="server" ImageUrl="~/Images/Common/btn_del0.png" OnClick="btnDel_Click" OnClientClick="return isCheck('GridView1');" /></li>
            </ul>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>  
            <asp:GridView ID="GridView1" runat="server" Width=100% PageSize=20 ClientIDMode=Static CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate><label><input type="checkbox" onclick="checkAll('GridView1',this);setTotal();" />全选</label></HeaderTemplate>
                        <ItemTemplate><input type=checkbox id="chkSel" name="chkSel" value='<%# Eval("ID") %>' onclick="setTotal();" /></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="合同编号" DataField="HTBH"/>
                    <asp:BoundField HeaderText="客户简称" DataField="KHJC"/>
                    <asp:BoundField HeaderText="产品编号" DataField="CPBH"/>
                    <asp:BoundField HeaderText="产品名称" DataField="CPMC"/>
                    <asp:BoundField HeaderText="产品类型" DataField="CPLX"/>
                    <asp:BoundField HeaderText="产品规格" DataField="CPGG"/>
                    <asp:BoundField HeaderText="产品颜色" DataField="CPYS"/>
                    <asp:TemplateField HeaderText="产品单价">
                        <ItemTemplate><%# Convert.ToDecimal(Eval("DJ")).ToString("F")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="数量" DataField="SL"/>
                    <asp:TemplateField HeaderText="金额">
                        <ItemTemplate><%# (Convert.ToDecimal(Eval("DJ")) * Convert.ToDecimal(Eval("SL"))).ToString("F")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="出货时间" DataField="CHSJ"/>
                </Columns>
                <PagerSettings Visible=false />
            </asp:GridView>
            <asp:GridView ID="GridView2" DataKeyNames="ID" runat="server" Width=100% PageSize=20 ClientIDMode=Static CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True" OnSelectedIndexChanging="GridView2_SelectedIndexChanging" OnRowDataBound="GridView2_RowDataBound">
                <Columns>
                    <asp:TemplateField ShowHeader="False">
                        <HeaderTemplate><label><input type="checkbox" onclick="checkAll('GridView1',this)" />全选</label></HeaderTemplate>
                        <ItemTemplate><input type=checkbox id="chkSel" name="chkSel" runat=server value='<%# Eval("ID") %>' /></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="编号" DataField="BH"/>
                    <asp:BoundField HeaderText="计划开始时间" DataField="JHKSSJ" DataFormatString="{0:yyyy-MM-dd}"/>
                    <asp:BoundField HeaderText="计划完成时间" DataField="JHWCSJ" DataFormatString="{0:yyyy-MM-dd}"/>
                    <asp:TemplateField HeaderText="状态">
                    <ItemTemplate><asp:Label ID="lblZT" runat="server" ForeColor="Red" Text="待确认"></asp:Label>
                        <asp:ImageButton ID="btnConfirm" runat="server" CommandName="Select" ImageUrl="~/Images/Common/btn_ok0.png" 
                            OnClientClick="javascript:return confirm('确认订单后，将直接生成合同，确定要继续吗？');" />
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="查看明细">
                        <ItemTemplate><input type=button value="明细" class=btn_s onclick="viewMX('<%#Eval("ID") %>')" /></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="修改">
                        <ItemTemplate><asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/Images/Common/btn_edit0.png" /></ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerSettings Visible=false />
            </asp:GridView>
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass="pager" UrlPaging="false" ShowCustomInfoSection="Left"
                FirstPageText="首页" LastPageText="尾页" PrevPageText="前页" NextPageText="后页" OnPageChanged="AspNetPager1_PageChanged" 
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" PageIndexBoxType="TextBox" ShowPageIndexBox="Always" 
                SubmitButtonText="Go" CustomInfoHTML="共%RecordCount%条数据，每页%PageSize%条，共%PageCount%页，当前为第%CurrentPageIndex%页">
            </webdiyer:AspNetPager>
            <asp:Panel ID="panMsg" runat="server" ClientIDMode=Static CssClass="msg24_attention" Visible=false>无相关数据</asp:Panel>
            </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="AspNetPager1" EventName="PageChanged" />
                    <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Command" />
                    <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Command" />
                    <asp:AsyncPostBackTrigger ControlID="LinkButton3" EventName="Command" />
                </Triggers>
            </asp:UpdatePanel>
       </td>
        <td class=tbBody_R></td>
    </tr>
    <tr>
        <td class=tbFoot_L></td>
        <td class=tbFoot_M></td>
        <td class=tbFoot_R></td>
    </tr>
</table>
</asp:Content>
